﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLBS.Entity;

namespace NLBS.Data.Interface
{
   public interface IUserService
    {
        #region User
        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <returns></returns>
         IList<User> GetUser();
        /// <summary>
        ///  根据用户ID获取用户
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <returns></returns>
         User GetUserByID(int userID);
        /// <summary>
        /// 根据用户名获取用户
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
         User GetUserByName(string userName);
        /// <summary>
        /// 新增一个用户
        /// </summary>
        /// <param name="user">待新增用户对象</param>
         void InsertUser(User user);
        /// <summary>
        /// 更新一个用户
        /// </summary>
        /// <param name="user">待更新用户对象</param>
         void UpdateUser(User user);

        /// <summary>
        /// 根据用户的ID删除一个用户
        /// </summary>
        /// <param name="userID">待删除用户ID</param>
         void DeleteUser(int userID);
        /// <summary>
        /// 验证用户的用户名和密码
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
         bool ValidateUser(string username, string password);


        #endregion
    }
}
